import request from '@/utils/request'

// 查询关重件数据列表
export function listKeys(query) {
  return request({
    url: '/base/keys/list',
    method: 'get',
    params: query
  })
}

// 查询关重件数据详细
export function getKeys(id) {
  return request({
    url: '/base/keys/' + id,
    method: 'get'
  })
}

// 新增关重件数据
export function addKeys(data) {
  return request({
    url: '/base/keys',
    method: 'post',
    data: data
  })
}

/**
* 根据车型全查询
*/
export function GetALLlistCloseHeavyParts(query) {
  return request({
    url: '/base/keys/getList',
    method: 'get',
    params: query
  })
}

// 修改关重件数据
export function updateKeys(data) {
  return request({
    url: '/base/keys',
    method: 'put',
    data: data
  })
}

// 删除关重件数据
export function delKeys(id) {
  return request({
    url: '/base/keys/' + id,
    method: 'delete'
  })
}

// 导出关重件数据
export function exportKeys(query) {
  return request({
    url: '/base/keys/export',
    method: 'get',
    params: query
  })
}
